]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extension-prefs: Force linking with libgnome-shell-js
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 10 Apr 2014 15:33:25 +0000 (17:33 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 15 Apr 2014 21:35:05 +0000 (23:35 +0200)
Use the same hack we use for the main executable to fool the linker
when using --as-needed.

https://bugzilla.gnome.org/show_bug.cgi?id=727948

src/gnome-shell-extension-prefs.c

index 75f687e7f68f85f2d49b26c60b86663e48ea2ede..e97df5df2d38c6244713fefa0fd481f8a5170c75 100644 (file)
@@ -50,3 +50,18 @@ main (int argc, char *argv[])
 
   return 0;
 }
+
+
+/* HACK:
+   Add a dummy function that calls into libgnome-shell-js.so to ensure it's
+   linked to /usr/bin/gnome-shell-extension-prefs even when linking with
+   --as-needed. This function is never actually called.
+   https://bugzilla.gnome.org/show_bug.cgi?id=670477
+*/
+void _shell_link_to_shell_js (void);
+
+void
+_shell_link_to_shell_js (void)
+{
+  shell_js_add_extension_importer (NULL, NULL, NULL, NULL);
+}